#ifndef EMPLOYEE_H
#define EMPLOYEE_H

#include <QString>

class Employee {
public:
    Employee();
    Employee(const QString &name, int age, const QString &department,
             const QString &position, double salary);

    // Getter方法
    QString getName() const;
    int getAge() const;
    QString getDepartment() const;
    QString getPosition() const;
    double getSalary() const;
    int getId() const;

    // Setter方法
    void setName(const QString &name);
    void setAge(int age);
    void setDepartment(const QString &department);
    void setPosition(const QString &position);
    void setSalary(double salary);

    static void setNextId(int id)
    {
            nextId = id;
    }

    static int getNextId()
    {
        return nextId;
    }

private:
    static int nextId; // 静态变量用于生成唯一ID
    int id;
    QString name;
    int age;
    QString department;
    QString position;
    double salary;
};




#endif // EMPLOYEE_H
